import Vue from 'vue'
import App from './App.vue'
import TypeNav from '@/components/TypeNav'
import Carousel from '@/components/Carousel'
import Pagenation from '@/components/Pagenation'
import { MessageBox } from 'element-ui'
//注册全局组件
Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.component(Pagenation.name, Pagenation)

Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
//引入路由
import router from '@/router'
//引入vuex的store仓库
import store from '@/store'
//引入mock模拟数据
import '@/mock/mockServer'
import 'swiper/css/swiper.css'

//引入素有的api文件夹里面的请求函数
import * as API from '@/api'

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router,
  store,
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  }

}).$mount('#app')
